Skip to content

Conversation

@openroad-ci
Copy link
Collaborator

This adjusts the Tcl utilitites used in OR flow scripts to correlate placement/routing parasitic estimates with final parasitic extraction. The following changes are made:

  • Vias are included in the route length data
  • Layers use global numbering to not be affected by routing layer span configured for individual designs
  • Supports an option to collect DRT route data in place of GRT
  • Collects the ground truth resistance value by summing the resistors in the parasitic network read from SPEF (new rsz::sum_parasitic_network_resist utility); this is a replacement for an earlier method of (1) only considering two-pin nets for resistance correlation (2) forcing "pi elmore" reduction of parasitics inside STA (3) looking up the reduced resistance via sta::find_pi_elmore

povik added 6 commits May 1, 2025 17:14
The `grt::route_layer_lengths` method is used in OR flow scripts to
correlate the final parasitic extraction with wire length on individual
layers. This way one can extract empirical coefficients for
`set_wire_rc`.

Enhance this method to include the number of via crossings, and remove
"last-mile pin connection patching" which was introducing duplicate
vias.

Signed-off-by: Martin Povišer <[email protected]>
Signed-off-by: Martin Povišer <[email protected]>
Add a DRT analogue of `grt::route_layer_lenghts` for RC correlation
experiments.

Signed-off-by: Martin Povišer <[email protected]>
@github-actions
Copy link
Contributor

github-actions bot commented May 1, 2025

clang-tidy review says "All clean, LGTM! 👍"

tool_category->writeTR(file_name);
}

std::vector<int> TritonRoute::routeLayerLengths(odb::dbWire* wire) const
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this in drt as it appears only use odb APIs?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It makes sense to have drt::route_layer_lengths as an analogue to grt::route_layer_lengths. The latter does use grt APIs so it can't be an odb utility. Should I move the drt one into the odb submodule, or just somewhere else in src/drt/src where it's more decoupled from the router itself?

route_pts.insert(RoutePt(segment.final_x, segment.final_y, layer));
}
}
// Mimic MakeWireParasitics::makeParasiticsToPin functionality.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is the following code no longer needed?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My understanding is the grt guides reach the center of the instance not the individual pins, and this code is adding a small patch of route on top of it to meet the pin. In the process it's adding a redundant via (so we overcount), and I'm not sure the wirelength it adds is beneficial either.

If it's true that it doesn't help with the estimation (which can be confirmed empirically) then we should remove the same code from makeParasiticsPin to keep things in sync

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@povik A small clarification, but GRT guides don't reach the center of the instance. They reach the center of the GCell that encloses the pin shape. The distance from the center of the GCell to the pin location might be useful (more than 7 tracks, for example)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the redundant via that is being added?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually the redundant via exists only in makeParasiticsToPin (see via_res in the function). Here it wasn't being counted because we weren't counting vias at all, but now that we do, we would have a redundant via if we updated this piece of code instead of removing it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm afraid I'm not following. My concern is that if estimate RC is creating a redundant via then it is incorrect and should be fixed. Perhaps you and @eder-matheus can review this issue.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've discussed with @eder-matheus and agreed to put this code back.

My concern is that if estimate RC is creating a redundant via then it is incorrect

There's redundant via in estimate RC but it's a dead end so if STA is considering topology of the parasitic network the extra resistive element is without effect. The length utility doesn't see topology.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 4, 2025

clang-tidy review says "All clean, LGTM! 👍"

@povik
Copy link
Contributor

povik commented Jun 4, 2025

@maliberty should be good to go

@maliberty maliberty merged commit 66559c8 into The-OpenROAD-Project:master Jun 4, 2025
11 checks passed
@maliberty maliberty deleted the grt-rc-correlate branch June 4, 2025 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants